<extend name="./Application/Home/View/default/_Layout/main.html"/>

<block name="breadcrumb">
    <div id="breadcrumb">
    </div>
</block>

<block name="main">
    <div class="container">
        <include file="index/nav" /><!-- 包含导航 -->
        <div class="row">
            <div class="col-sm-9">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object" src="{$info.cover|get_cover}" alt="{$info.title}" style="width:100px;height:100px;">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">
                                    {$info.title}
                                    <if condition="$info.price neq '0'">
                                        <span class="pull-right text-danger" role="button">
                                            ¥{$info.price}
                                            <span class="small">已售:{$info.buy}</span>
                                        </span>
                                    </if>
                                </h4>
                                {$info.description}
                                <if condition="$info.price eq '0'">
                                    <a href="{:U('Appstore/Home/App/download', array('token' => $app_version_list[0]['token']))}" class="btn btn-success pull-right"><i class="fa fa-download"></i> 下载最新版</a>
                                <else />
                                    <a href="{:U('Appstore/Home/App/download', array('token' => $info['id']))}" class="btn btn-warning pull-right" role="button"><i class="fa fa-shopping-cart"></i> 立即购买</a>
                                </if>
                                <div>
                                    <input id="input-id" type="number" name="rate" class="rating" data-glyphicon="false" min=0 max=5 step=1 data-size="sm">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                     <div class="panel-heading">介绍</div>
                     <div class="panel-body">
                         {$info.content}
                     </div>
                </div>
                <div class="panel panel-default">
                     <div class="panel-heading">版本</div>
                     <div class="panel-body">
                         <volist name="app_version_list" id="version">
                             <div class="margin-bottom">
                                 <div>
                                    <span class="text-success">{$version.ctime|time_format}</span>
                                    <span class="text-danger">v{$version.version}</span>
                                    <a href="{:U('Appstore/Home/App/download', array('token' => $version['token']))}" class="text-primary">下载</a>
                                 </div>
                                 <div>{$version.description}</div>
                             </div>
                         </volist>
                         <empty name="app_version_list">
                             <div class="alert alert-info">一个版本也没有</div>
                         </empty>
                     </div>
                </div>
                <div class="panel ad hidden-xs">
                    <script type="text/javascript">
                        var cpro_id="u2234477";
                        (window["cproStyleApi"] = window["cproStyleApi"] || {})[cpro_id]={at:"3",rsi0:"846",rsi1:"250",pat:"6",tn:"baiduCustNativeAD",rss1:"#FFFFFF",conBW:"1",adp:"1",ptt:"0",titFF:"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91",titFS:"",rss2:"#000000",titSU:"0",ptbg:"90",piw:"0",pih:"0",ptp:"0"}
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="panel panel-info">
                    <div class="panel-heading">作者</div>
                    <div class="panel-body">
                        <img src="{$info.user.avatar|get_cover='avatar'}" style="width:80px;height:80px;">
                        <span>{$info.user.username}</span>
                        <div class="blank"></div>
                        <ul class="list-unstyled">
                            <li>官网：<a target="_blank" href="{$info.user.website|default='http://www.corethink.cn'}">{$info.user.website|default='http://www.corethink.cn'}</a></li>
                            <li>邮箱：{$info.user.email}</li>
                            <li>电话：{$info.user.mobile}</li>
                            <li>Q Q：{$info.user.mobile}</li>
                            <li>最后登录：{$info.user.last_login_time|friendly_date}</li>
                        </ul>
                    </div>
                </div>
                <div class="panel ad hidden-xs">
                    <script type="text/javascript">
                        var cpro_id="u2234525";
                        (window["cproStyleApi"] = window["cproStyleApi"] || {})[cpro_id]={at:"3",rsi0:"261",rsi1:"261",pat:"17",tn:"baiduCustNativeAD",rss1:"#FFFFFF",conBW:"1",adp:"1",ptt:"0",titFF:"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91",titFS:"14",rss2:"#000000",titSU:"0"}
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
                    
                    <script type="text/javascript">
                        var cpro_id="u2234560";
                        (window["cproStyleApi"] = window["cproStyleApi"] || {})[cpro_id]={at:"3",rsi0:"261",rsi1:"261",pat:"6",tn:"baiduCustNativeAD",rss1:"#FFFFFF",conBW:"1",adp:"1",ptt:"0",titFF:"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91",titFS:"",rss2:"#000000",titSU:"0",ptbg:"90",piw:"0",pih:"0",ptp:"0"}
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>

                    <script type="text/javascript">
                        var cpro_id="u2234500";
                        (window["cproStyleApi"] = window["cproStyleApi"] || {})[cpro_id]={at:"3",rsi0:"261",rsi1:"261",pat:"3",tn:"baiduCustNativeAD",rss1:"#FFFFFF",conBW:"1",adp:"1",ptt:"0",titFF:"%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91",titFS:"",rss2:"#000000",titSU:"0",tft:"0",tlt:"1"}
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
                </div>
            </div>
        </div>
    </div>
</block>
